#include<iostream>
using namespace std;
int main()
	{
		int arr[5]={1,2,4,5,8};
		cout<<"逆置前的数组输出："<<endl;
		for(int i=0;i<5;i++)
		{
			cout<<arr[i];
			cout<<" ";
		}
		cout<<endl;
		int temp;
		int start=0;
		int end=sizeof(arr)/sizeof(arr[0])-1;
		while(start<end)
		{
			temp=arr[start];
			arr[start]=arr[end];
			arr[end]=temp;
			start++;
			end--;
		}
		cout<<"逆置后的数组输出："<<endl;
		for(int i=0;i<5;i++)
		{
			cout<<arr[i];
			cout<<" ";
		}
		return 0;
	}